package com.zzw.hj57;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 高精度整数加法
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder sb1 = new StringBuilder(in.nextLine()).reverse();
        StringBuilder sb2 = new StringBuilder(in.nextLine()).reverse();

        StringBuilder result = new StringBuilder();
        int len = Math.max(sb1.length(), sb2.length());
        int flag = 0; // 表示进位的标志
        for (int i = 0; i < len; i++) {
            int a = 0, b = 0;
            if (i < sb1.length()) {
                a = Integer.parseInt(String.valueOf(sb1.charAt(i)));
            }
            if (i < sb2.length()) {
                b = Integer.parseInt(String.valueOf(sb2.charAt(i)));
            }
            int sum = a + b + flag;
            flag = sum / 10; // 重置进位
            result.append(sum % 10);
        }
        if (flag != 0) {
            result.append(flag);
        }
        System.out.println(result.reverse());
    }
}